package com.luhui.codereview

import com.intellij.openapi.editor.Editor
import com.luhui.codereview.listeners.FileEditorMouseListener
import java.util.concurrent.ConcurrentHashMap

/**
 * @author  luhui
 * @date  2019/11/3 0:52
 * @version 1.0
 */
private val cacheMap = ConcurrentHashMap<Editor, FileEditorMouseListener>()

fun containsEditor(editor: Editor):Boolean{
    return cacheMap.containsKey(editor)
}

fun putLiutener(editor: Editor,fileEditorMouseListener:FileEditorMouseListener){
    cacheMap[editor] = fileEditorMouseListener
}

fun getListner(editor: Editor): FileEditorMouseListener? {
    return cacheMap[editor]
}

